package pojo;

import java.util.Objects;

public class TbUserRole {
    private Integer userRoleId;
    private Integer roleId;
    private Integer userId;
    private TbRole tbRoleByRoleId;
    private TbUser tbUserByUserId;

    public Integer getUserRoleId() {
        return userRoleId;
    }

    public void setUserRoleId(Integer userRoleId) {
        this.userRoleId = userRoleId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbUserRole that = (TbUserRole) o;
        return Objects.equals(userRoleId, that.userRoleId) &&
                Objects.equals(roleId, that.roleId) &&
                Objects.equals(userId, that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userRoleId, roleId, userId);
    }

    public TbRole getTbRoleByRoleId() {
        return tbRoleByRoleId;
    }

    public void setTbRoleByRoleId(TbRole tbRoleByRoleId) {
        this.tbRoleByRoleId = tbRoleByRoleId;
    }

    public TbUser getTbUserByUserId() {
        return tbUserByUserId;
    }

    public void setTbUserByUserId(TbUser tbUserByUserId) {
        this.tbUserByUserId = tbUserByUserId;
    }
}
